<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
</head>

<body>
    <script>
        // XML 是一种数据格式（类似于HTML标签的结构）
        var str =
            "uname:lisi;age:12;gender:male,uname:zhangsan;age:13;gender:female";
        // XML 建立了数据标准：数据格式统一
        // 但是这种格式有缺陷：1、冗余信息太多；不方便前端解析
        // XML格式数据现在还常用吗？不常用
        /*
        <userlist>
            <user>
            <username>张三</username>
            <age>12</age>
            <gender>male</gender>
            </user>
            <user>
            <username>李四</username>
            <age>13</age>
            <gender>female</gender>
            </user>
        </userlist>
     */
        var users = str.split(",");
        console.log(users);
        var jsonStr = '{"uname":"lisi","age","12"}';
        console.log(jsonStr.uname);
    </script>
</body>

</html>